﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp_AutoFac
{
    public interface IFlay
    {
        void HowToFaly();
    }


    public class SingleFlay : IFlay
    {
         static SingleFlay _singleFlay = new SingleFlay();

        public static SingleFlay GetSingleFlay => _singleFlay;

        SingleFlay()
        {

        }
        public void HowToFaly()
        {
            throw new NotImplementedException();
        }
    }

    public class Bird : IFlay
    {
        public string Name { get; set; }

        public Bird(string name)
        {
            Name = name;
        }

        public void HowToFaly()
        {
            Console.WriteLine("鸟会飞"+Name);
        }
    }
}
